<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/util_file/common_basics.jspf"%>
<%@ include file="/WEB-INF/util_file/smartEditor.jspf"%>
<script type="text/javascript">
	//Smart Edito 등록
	var oEditors = [];
	nhn.husky.EZCreator.createInIFrame({
	oAppRef: oEditors,
	elPlaceHolder: "content",
	sSkinURI: "/jeons/se/SEditorSkin.html",
	fCreator: "createSEditorInIFrame"
	}); 
	
	$("#BtnSubmit_review").click( function(){
		oEditors.getById["content"].exec("UPDATE_IR_FIELD",[]);//Smart Editors
		var obj = $("#reviewDTO").serialize();
		$.post('/jeons/review/insert',obj,function(data){
			$("#qna_bdno").each(function(){
				$.get('/jeons/review/index?bdno='+$("#qna_bdno").val(), function(data){
					$("#subpage_review").replaceWith(data);
				});
			 });
			
		});
	});
	
	//bdno 값 전달
	$("#qna_bdno").each(function(){
		$(".bdno").val($("#qna_bdno").val());
	});
	
	//qna_bdtype 값 전달
	$("#qna_bdtype").each(function(){
		$(".bdtype").val($("#qna_bdtype").val());
	});
	
	
	//리스트 가기
	$("#BtnList_review").click(function(){
		$("#qna_bdno").each(function(){
			$.get('/jeons/review/index?bdno='+$("#qna_bdno").val(), function(data){
				$("#subpage_review").replaceWith(data);
			});
		 });
		
		
	});
	
	alert($("SELECT.husky_seditor_ui_fontName_select").html());
	
</script>
<div id="subpage_review">
<input type="text" id="tmp10" />
<form:form commandName="reviewDTO" id="reviewDTO" method="post">
<form:input path="bdno" class="bdno"/>
<form:input path="bdtype" class="bdtype"/>
<form:input path="reno"/>
<table border="0" width="650px" height="50">
	<tr>
		<td colspan="4" bgcolor="#000000" height="1"></td>
	</tr>
	<tr>
		<th height="24" align="center">제목</th>
		<td colspan="3"><form:input path="title"/></td>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<th height="24" align="center">유저아이디</th>
		<td colspan="3"><form:input path="u_id" /></td>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<th height="24" align="center">점수</th>
		<td colspan="3">
		<form:select path="score">
			<form:option value="one">1점</form:option>
			<form:option value="two">2점</form:option>
			<form:option value="three">3점</form:option>
			<form:option value="four">4점</form:option>
			<form:option value="five">5점</form:option>
		</form:select>
		</td>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<th colspan="4" height="4" align="center">내용</th>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1">
			<form:textarea path="content" name="content" cols="75" rows="20" cssStyle="overflow-x:hidden"></form:textarea>
		</td>
	</tr>
	<tr>
	<tr>
		<td colspan="4" bgcolor="#000000" height="1"></td>
	</tr>
</table>
<div align="right">
	<button type="button" id="BtnSubmit_review">확인</button>
	<button type="button" id="BtnList_review">리스트</button>
</div>
</form:form>
</div>